function getTags(ptag,pdiv,by,order)
  {
    var field = document.getElementById(ptag).value;
	if (field=="") field="-";
    var msg = document.getElementById(pdiv);
	document.getElementById("kettag").innerHTML = field;
 
    xmlhttp=mintajax();
    xmlhttp.onreadystatechange=function()
    {
      if (xmlhttp.readyState== 4 && xmlhttp.status== 200)
      {
        msg.innerHTML = xmlhttp.responseText;
      }
    }
    xmlhttp.open("GET","listkonten.php?tags="+field+"&by="+document.getElementById(by).value+"&order="+document.getElementById(order).value,true);
    xmlhttp.send(null);
}

function getTagged(ptag,pdiv,by,order)
  {
    var field = document.getElementById(ptag).innerHTML;
    var msg = document.getElementById(pdiv);
 
    xmlhttp=mintajax();
    xmlhttp.onreadystatechange=function()
    {
      if (xmlhttp.readyState== 4 && xmlhttp.status== 200)
      {
        msg.innerHTML = xmlhttp.responseText;
      }
    }
    xmlhttp.open("GET","listkonten.php?tags="+field+"&by="+document.getElementById(by).value+"&order="+document.getElementById(order).value,true);
    xmlhttp.send(null);
}

function getTag(field,pdiv,by,order)
  {
	if (field=="") field="-";
    var msg = document.getElementById(pdiv);
	document.getElementById("kettag").innerHTML = field;
 
    //var message = '';
    xmlhttp=mintajax();
    xmlhttp.onreadystatechange=function()
    {
      if (xmlhttp.readyState== 4 && xmlhttp.status== 200)
      {
		//var result = eval("("+xmlhttp.responseText+")");
        //message = result['result'];
        msg.innerHTML = xmlhttp.responseText;
      }
    }
    xmlhttp.open("GET","listkonten.php?tags="+field+"&by="+document.getElementById(by).value+"&order="+document.getElementById(order).value,true);
    xmlhttp.send(null);
}

function getPost(field,pdiv,by,order,page)
  {
    var msg = document.getElementById(pdiv);
	var tags = document.getElementById(field).innerHTML;
	
    xmlhttp=mintajax();
    xmlhttp.onreadystatechange=function()
    {
      if (xmlhttp.readyState== 4 && xmlhttp.status== 200)
      {
        msg.innerHTML = xmlhttp.responseText;
      }
    }
    xmlhttp.open("GET","listpost.php?tags="+tags+"&by="+document.getElementById(by).value+"&order="+document.getElementById(order).value+"&page="+page,true);
    xmlhttp.send(null);
}